#pragma once

#include "..\common\classdef.h"
#include "user.h"
#include "DarkSpirit.h"
#include "MuLua.h"
#include "Luna.h"

static struct ClassCalc_Bind
{
	const char * Name;
	int	Varible;
};

class ClassCalc
{
public:
	void	SetClass(LPOBJ lpUser, MULua * Lua);
	static int GetClassVar(lua_State * Lua);
	int		GetLevelPoint(LPOBJ lpUser);
	bool	GetAttackDamage(LPOBJ lpUser, bool bWithBow);
	bool	GetMagicDamage(LPOBJ lpUser);
	float	GetPvPAttackRate(LPOBJ lpUser);
	bool	GetAttackSpeed(LPOBJ lpUser);
	bool	GetDefense(LPOBJ lpUser);
	float	GetPvPDefenseRate(LPOBJ lpUser);
	bool	GetSuccessfulBlocking(LPOBJ lpUser);
	bool	GetDarkSpiritStats(LPOBJ lpUser, CDarkSpirit * Pet, int PetLevel);
public:
	ClassCalc_Bind	m_Bind[11];
};
extern ClassCalc g_ClassCalc;